/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Engine2D.renderer;

/**
 *
 * @author Garys
 */
public class Renderer {

    /**
     * 
     */
    public static GLRenderer renderer = new DefaultRenderer();

    /**
     * 
     */
    public static final int LINE_STRIP_RENDERER = 1;
    /**
     * 
     */
    public static final int QUAD_LINE_STRIP_RENDERER = 2;
    
    private static LineStripRendererInterface lineStripRenderer = new LineStripRenderer();
    
    /**
     * 
     * @return
     */
    public static GLRenderer get() {
        return renderer;
    }

    /**
     * 
     * @param type
     */
    public static void setLineStripRenderer(int type) {
        switch (type) {
            case LINE_STRIP_RENDERER:
                setLineStripRenderer(new LineStripRenderer());
                return;
            case QUAD_LINE_STRIP_RENDERER:
                setLineStripRenderer(new QuadLineStripRenderer());
                return;
        }
        
        throw new RuntimeException("Unknown line strip renderer type: "+type);

    }

    private static void setLineStripRenderer(LineStripRendererInterface renderer) {
        lineStripRenderer = renderer;
    }
    
}
